home *** CD-ROM | disk | FTP | other *** search
/ APDL Other Worlds / APDL Other Worlds Collection.iso / SF3000 / Extras / CBlibrary / h / ViewsMenu < prev   
Encoding:
Text File  |  2003-09-11  |  2.2 KB  |  58 lines

  1. /*
  2.  * CBLibrary - ViewsMenu
  3.  * Copyright (C) 2003  Chris Bazley
  4.  *
  5.  * This library is free software; you can redistribute it and/or
  6.  * modify it under the terms of the GNU Lesser General Public
  7.  * License as published by the Free Software Foundation; either
  8.  * version 2.1 of the License, or (at your option) any later version.
  9.  *
  10.  * This library is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.  * Lesser General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU Lesser General Public
  16.  * License along with this library; if not, write to the Free Software
  17.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18.  */
  19.  
  20. /* General code to maintain a list of views and build iconbar menu */
  21.  
  22. #ifndef ViewsMenu_h
  23. #define ViewsMenu_h
  24.  
  25. #include <stdbool.h>
  26. #include "kernel.h"
  27. #include "toolbox.h"
  28.  
  29. /*
  30.    - The 'views' menu must be 'shared' and have the template name
  31.    "ViewsMenu".
  32.  
  33.    - The parent menu must deliver Menu_AboutToBeShown and
  34.    Menu_HasBeenHidden events.
  35.  
  36.    - When the parent menu is (auto-)created, its ObjectId and the
  37.    ComponentId of the 'views' submenu must be passed to
  38.    ViewsMenu_parentcreated()
  39.  
  40.    - File paths MUST be canonicalised (OS_FSControl 37) before being
  41.    passed to ViewsMenu, though case may differ.
  42. */
  43.  
  44. extern bool ViewsMenu_strcmp_nc(const char *string1, const char *string2);
  45. extern _kernel_oserror *ViewsMenu_create(void);
  46. extern _kernel_oserror *ViewsMenu_parentcreated(ObjectId parent_menu, ComponentId parent_entry);
  47.  
  48. extern _kernel_oserror *ViewsMenu_add(ObjectId showobject, char *view_name, char *file_path);
  49. extern _kernel_oserror *ViewsMenu_setname(ObjectId showobject, char *view_name, char *file_path);
  50. extern _kernel_oserror *ViewsMenu_remove(ObjectId showobject);
  51. extern _kernel_oserror *ViewsMenu_showall(void);
  52. extern ObjectId ViewsMenu_findview(char *file_path_to_match);
  53. extern ObjectId ViewMenu_getfirst(void);
  54. extern ObjectId ViewMenu_getnext(ObjectId current);
  55. extern _kernel_oserror *ViewsMenu_show_object(unsigned int flags, ObjectId id, int show_type, void *type, ObjectId parent, ComponentId parent_component);
  56.  
  57. #endif
  58.